package com.liz.tectSelect.nettySpringbootRestfulApi.netty;

import io.netty.channel.ChannelHandler;
import io.netty.handler.codec.http.HttpRequestDecoder;
import io.netty.handler.codec.http.HttpResponseEncoder;
import io.netty.handler.codec.string.StringDecoder;
import io.netty.handler.codec.string.StringEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class NettyConfig {

    @Bean(name = "stringEncoder")
    public StringEncoder stringEncoder() {
        return new StringEncoder();
    }

    @Bean(name = "stringDecoder")
    public StringDecoder stringDecoder() {
        return new StringDecoder();
    }

//    @Bean(name = "httpRequestDecoder")
//    public HttpRequestDecoder httpRequestDecoder(){
//        return new HttpRequestDecoder();
//    };
//    @Bean(name = "httpResponseEncoder")
//    public HttpResponseEncoder httpResponseEncoder(){
//        return new HttpResponseEncoder();
//    };


}
